package com.orkcto.springcloude.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

@Configuration //等价一个xml 配置文件
public class BaseConfig {

    @LoadBalanced
    @Bean  //注解就是将返回的类  自动加载到IOC容器中
    public RestTemplate restTemplate(){
        return  new RestTemplate();
    }
}
